﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;

namespace QuanLyDaiLy.Model
{
    [Table (Name="LoaiDaiLy")]
    public class CLoaiDaiLy
    {
        #region Properties
        [Column (Name="MaLoaiDaiLy",IsPrimaryKey=true)]
        public int MaLoaiDaiLy { get; set; }

        [Column(Name = "TenLoaiDaiLy", CanBeNull=true)]
        public string TenLoaiDaiLy { get; set; }

        [Column(Name = "NoToiDa")]
        public int NoToiDa { get; set; }
        #endregion

        #region Constructor
        public CLoaiDaiLy()
        {
        }

        public CLoaiDaiLy(string tenloaidaily, int notoida)
        {
            Initialize(tenloaidaily, notoida);
        }

        public CLoaiDaiLy(int maloaidaily, string tenloaidaily, int notoida)
        {
            Initialize(tenloaidaily, notoida);
            this.MaLoaiDaiLy = maloaidaily;
        }

        public void Initialize(string tenloaidaily, int notoida)
        {
            this.TenLoaiDaiLy = tenloaidaily;
            this.NoToiDa = notoida;
        }
        #endregion
    }
}
